package com.gwm.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gwm.order.entity.TbOrder;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author heima
 * @since 2020-12-01
 */
public interface TbOrderMapper extends BaseMapper<TbOrder> {

    @Update(" update tb_order set status = 5 where  status=1 and    TIMESTAMPDIFF(MINUTE, create_time,NOW()) >60")
    void updateOverTimeOrderStatus();

    @Update(" update tb_order set status = 5 where  status=1 and    TIMESTAMPDIFF(MINUTE, create_time,NOW()) >5")
    void cleanOvertimeSeckillOrder();

}
